home *** CD-ROM | disk | FTP | other *** search
- #ifndef __PICTCONTROL__
- #define __PICTCONTROL__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __CONTROLS__
- #include <Controls.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
- ControlHandle CPICTNew(WindowPtr window, Rect *r, StringPtr title, Boolean vis, short val,
- short min, short max, short viewID, short refcon);
- /*
- ** ¶ Create a new 'PICT' control.
- **
- ** INPUT: window The window to add the control to
- ** r The bounding rect of the control being added
- ** title The title of the control being added (don't pass in nil here)
- ** vis True if control should be created initially visible
- ** val Initial value for the contrlValue field of the control
- ** val Initial value for the contrlMin field of the control
- ** val Initial value for the contrlMax field of the control
- ** viewID Normally rPICTCtl, as that is the standard AppsToGo
- ** resource ID for this control, but you may wish to have
- ** the CDEF have a different resource id #.
- ** refcon Initial value for the contrlRfCon field of the control
- ** RESULT: ControlHandle The control handle of the created control, or nil if
- ** the control could not be created.
- **
- ** Create a new PICT control. All the parameters are what you would expect for creating
- ** a new control.
- ** Variants:
- ** +1: Sticky buttons. (Can't be tracked off of once clicked on.)
- ** +2: Draw offscreen. This is important if the control has a title and
- ** you don't want flashing.
- ** +4: Size control to PICT. This saves you the trouble of setting the
- ** bounding box of the control to the size of the PICT. Note that
- ** the control is simply created based on the bounding rect of the PICT,
- ** instead of the control.
- ** +8: Draw the control title in srcOr mode after drawing the PICT. This allows
- ** you to easily add text to a PICT control, not to mention change the
- ** text while the application is running. */
-
- ControlHandle CPICTNext(WindowPtr window, ControlHandle ctl, short dir, Boolean justActive);
- /*
- ** ¶ Iterate to the 'next' PICT control.
- **
- ** INPUT: window The window who's control list is to be searched
- ** ctl The control at which to start the search
- ** (Pass in nil to start at the beginning of the control list.)
- ** dir The direction of the search (1 or -1). Note that the meaning
- ** of the beginning of the control list changes if -1 is passed in.
- ** The beginning of the control list to search is actually the
- ** last control in the window's control list if -1 is used.
- ** justActive If true, only find CPICT controls that are active.
- ** (Active is defined as contrlHilite != 255).
- ** OUTPUT: ControlHandle Handle of PICT found. If nil is returned, no more to
- ** be found meeting criteria.
- **
- ** Return the next PICT control from a window's control list.
- **
- ** To get the first control in the window's control list, pass in a nil for ctl.
- ** Pass in either 1 or -1 for the direction of the search. Passing in a 1 means to
- ** return the control just after the one passed in (or the first one if nil is passed in).
- ** Passing in a -1 means to return the control just prior to the one passed in (or the
- ** last control if nil is passed in). If there are no more controls, then nil is returned.
- ** The justActive field indicates if you want to return only visible, active controls.
- ** If false is passed in, then the next control is returned, independent of state.
- ** If true is passed in, then the next visible, active control is returned. */
-
- Boolean IsPICTCtl(ControlHandle ctl);
- /*
- ** ¶ Check if the control is a 'PICT' control.
- **
- ** INPUT: ctl Handle of control to test to see if it is a PICT control.
- ** RESULT: Boolean True if control is a PICT control.
- **
- ** Check to see if the control is a PICT control. */
-
-
- #endif
-
-